<?php include('header.php'); ?>

<!-- additional javascript hear -->

<style type="text/css">
<!--
#wrapper #one_wide .item table tr td a img {
	color: #F2F9FF;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<!-- menu -->
<?php include('menu.php'); ?>
<!-- end menu -->

<!-- navigator -->
<?php include('navigator.php'); ?>
<!-- nav end -->

 <div id="one_wide">
<?php
	if($this->session->flashdata('error'))
	{ 
		echo '<div class="error">' . $this->session->flashdata('error') . '</div>';
	}
	elseif($this->session->flashdata('success'))
	{
		echo '<div class="success">' . $this->session->flashdata('success') . '</div>';
	}
	
	echo validation_errors('<div class="error">', '</div>');
?>

<div class="item">
<img src="<?=base_url();?>application/images/find.gif" />
<h3>ค้นหา</h3><hr />
<h4>กรุณาระบุชื่อ หรือ อีเมลล์ ที่ต้องการค้นหา.</h4>
<p>
<?php echo form_open('search');?>
<input class="input-text" name="search" type="text" size="30" >
<input type="submit" class="button" value="ค้นหา">
</form>
<i>&nbsp;Examples: Somchai, or somchai@email.com</i>
</p>
<hr />
<p>
<?php
	if($result != FALSE)
	{
		foreach($result as $row):
			{
?>

<table width="100%" border="0" cellpadding="4" cellspacing="4" bgcolor="#ECFFEC">
      <tr>
		    <td width="36" rowspan="4" align="left" valign="top" bgcolor="#ECFFEC"><a href="<?=base_url();?>user/id/<?=$row['user_id'];?>"><img src="<?=$this->usermodel->getAvatar($row['user_id']);?>" alt="<?=$row['username'];?>" /></a></td>
		    <td width="750" bgcolor="#ECFFEC"><h2><a href="<?=base_url();?>user/id/<?=$row['user_id'];?>"><?=$row['username'];?></a></h2></td>
        </tr>
		  <tr>
		    <td bgcolor="#ECFFEC"><strong>email: </strong><?=$row['email'];?><br /></td>
        </tr>
		  <tr>
		    <td bgcolor="#ECFFEC"><strong>about: </strong><?=$row['about'];?></td>
        </tr>
</table><hr />

<?php		}
		endforeach;
	}
	else
	{
		echo "<i>Not found.</i>";
	}

?>
</p>
</div>
</div>
<!-- footer -->
<?php include('footer.php');?>
<!-- footer end -->
</div>
</body>
</html>